//
//  MZY_EX_informationCell.m
//  FullHouse
//
//  Created by dllo on 16/1/28.
//  Copyright © 2016年 yy. All rights reserved.
//

#import "MZY_EX_informationCell.h"

#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
#define HORIZONTAL [UIScreen mainScreen].bounds.size.width / 414
#define VERTICAL [UIScreen mainScreen].bounds.size.height / 736

@implementation MZY_EX_informationCell

- (void)dealloc
{
    [self.locationLabel release];
    [self.locationDetailLabel release];
    [self.nativeLabel release];
    [self.nativeDetailLabel release];
    [self.experienceLabel release];
    [self.experienceDetailLabel release];
    [self.wayLabel release];
    [self.wayFirstDetailLabel release];
    [self.waySecondDetailLabel release];
    [self.wayThirdDetailLabel release];
    [super dealloc];
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView{
    self.locationLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.locationLabel];
    [self.locationLabel release];
    
    self.locationDetailLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.locationDetailLabel];
    [self.locationDetailLabel release];
    
    self.nativeLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.nativeLabel];
    [self.nativeLabel release];
    
    self.nativeDetailLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.nativeDetailLabel];
    [self.nativeDetailLabel release];
    
    self.experienceLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.experienceLabel];
    [self.experienceLabel release];
    
    self.experienceDetailLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.experienceDetailLabel];
    [self.experienceDetailLabel release];
    
    self.wayLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.wayLabel];
    [self.wayLabel release];
    
    self.wayFirstDetailLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.wayFirstDetailLabel];
    [self.wayFirstDetailLabel release];
    
    self.waySecondDetailLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.waySecondDetailLabel];
    [self.waySecondDetailLabel release];
    
    self.wayThirdDetailLabel = [[UILabel alloc]init];
    [self.contentView addSubview:self.wayThirdDetailLabel];
    [self.wayThirdDetailLabel release];
    
    self.allInformationButton = [UIButton buttonWithType:UIButtonTypeSystem];
    [self.contentView addSubview:self.allInformationButton];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.locationLabel.frame = CGRectMake(10 * HORIZONTAL, 10 * VERTICAL, 80, 20 * VERTICAL);
    self.locationDetailLabel.frame = CGRectMake(130 * HORIZONTAL, 10 * VERTICAL, 200 * HORIZONTAL, 20 * VERTICAL);
    self.nativeLabel.frame = CGRectMake(10 * HORIZONTAL, 50 * VERTICAL, 80, 20 * VERTICAL);
    self.nativeDetailLabel.frame = CGRectMake(130 * HORIZONTAL, 50 * VERTICAL, 100 * HORIZONTAL, 20 * VERTICAL);
    self.experienceLabel.frame = CGRectMake(10 * HORIZONTAL, 90 * VERTICAL, 80, 20 * VERTICAL);
    self.experienceDetailLabel.frame = CGRectMake(130 * HORIZONTAL, 90 * VERTICAL, 100 * HORIZONTAL, 20 * VERTICAL);
    self.wayLabel.frame = CGRectMake(10 * HORIZONTAL, 130 * VERTICAL, 80, 20 * VERTICAL);
    self.wayFirstDetailLabel.frame = CGRectMake(130 * HORIZONTAL, 130 * VERTICAL, 60 * HORIZONTAL, 20 * VERTICAL);
    self.waySecondDetailLabel.frame = CGRectMake(200 * HORIZONTAL, 130 * VERTICAL, 60 * HORIZONTAL, 20 * VERTICAL);
    self.wayThirdDetailLabel.frame = CGRectMake(280 * HORIZONTAL, 130 * VERTICAL, 60 * HORIZONTAL, 20 * VERTICAL);
    self.allInformationButton.frame = CGRectMake(140 * HORIZONTAL, 170 * VERTICAL, 120, 40);
}

@end
